package com.hxd.otc.common.enums;

/**
 * Created by lzy on 2018/12/5 0005.
 * description ${身份认证等级}
 */
public enum CardLevelEnum {
    LEVEL_0(0, "V0"), LEVEL_1(1, "V1"), LEVEL_2(2, "V2");

    private final int mValue;
    private final String mDesc;

    CardLevelEnum(int value, String desc) {
        mValue = value;
        mDesc = desc;
    }

    public int getValue() {
        return mValue;
    }

    public String getDesc() {
        return mDesc;
    }

    public static CardLevelEnum getInstance(int value) {
        switch (value) {
            case 1:
                return CardLevelEnum.LEVEL_1;
            case 2:
                return CardLevelEnum.LEVEL_2;
            default:
                return CardLevelEnum.LEVEL_0;
        }
    }
}
